package org.yxing.palpalgps;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.widget.Toast;

public class BaseActivity extends Activity {
    protected ProgressDialog pd;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        pd = new ProgressDialog(this);
        pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        pd.setMessage(getString(R.string.progress));
    }
    
    protected void displayToast(String str) {
        Toast.makeText(this, str, Toast.LENGTH_SHORT).show();
    }
    
    protected void displayToast(int resId) {
        displayToast(getString(resId));
    }
    
    protected void showPd() {
        pd.cancel();
        pd.show();
    }
    
    protected void cancelPd() {
        pd.cancel();
    }
    
}
